<template>
  <div class="hamburger" @click="toggleClick">
    <div class="hamburger-img" :class="{'is-active':!isActive}">
      <img :src="img_url_right" @click.stop="toggleClick"  :class="{'is-active':!isActive}" alt="close"
           style="cursor:pointer">
    </div>
  </div>
</template>

<script>
export default {
  name: 'hamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    },
    toggleClick: {
      type: Function,
      default: null
    }
  },
  data() {
    return {
      img_url_right: require('@/assets/right.png')
    }
  }
}
</script>

<style scoped>
/*.hamburger {*/
	/*display: inline-block;*/
	/*cursor: pointer;*/
	/*width: 20px;*/
	/*height: 20px;*/
	/*transform: rotate(90deg);*/
	/*transition: .38s;*/
	/*transform-origin: 50% 50%;*/
/*}*/
/*.hamburger.is-active {*/
	/*transform: rotate(0deg);*/
/*}*/
.hamburger-img{
  cursor: pointer;
  transform: rotate(180deg);
  transition: .38s;
  transform-origin: 50% 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hamburger-img.is-active {
  transform: rotate(0deg);
}

.hamburger {
  cursor: pointer;
  transform: rotate(180deg);
  transition: .38s;
  transform-origin: 50% 50%;
  background-color: #3f4d64;
  width: 100%;
  height:34px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hamburger.is-active {
  width: auto!important;
  transform: rotate(0deg);
}
</style>
